import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
import Home from '../components/home.vue'
import Nf from '../components/noFound.vue'
import HealthForm from '../components/healthform.vue'
import MedicalChart from '../components/medicalchart.vue'
import Student from '../components/student.vue'
const routes = [

	{
		path: "/",
		redirect: "/home"
	},
	{
		path: '/home',
		component: Home,
		meta: {
			title: "主页"
		},
		redirect: '/student',
		children: [{
			path: '/healthform',
			component: HealthForm,
		}, {
			path: '/medicalchart',
			component: MedicalChart,
		}, {
			path: '/student',
			component: Student,
		}, ],
	},
	{
		path: "/404",
		component: Nf,
		meta: {
			title: "404"
		},
	},
	{
		path: "/:catchAll(.*)",
		redirect: "/404"
	},
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})


export default router
